package com.study.happystudy.service.impl;

import com.study.happystudy.mapper.UserMistakeMapper;
import com.study.happystudy.po.UserMistake;
import com.study.happystudy.service.UserMistakeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserMistakeServiceImpl implements UserMistakeService {
    @Resource
    UserMistakeMapper um;
    @Override
    public void addMistake(int userId, int questionId) {
        um.addMistake(userId,questionId);
    }

    public void removeMistake(int userId, int questionId) {
        um.removeMistake(userId,questionId);
    }


    @Override
    public List<UserMistake> getMistakeByUserIdAndSubjectId(int userId, int subjectId) {
        return um.getMistakeByUserIdAndSubjectId(userId,subjectId);
    }

    @Override
    public List<UserMistake> getMistakesByUserId(int userId) {
        return um.getMistakesByUserId(userId);
    }

}
